<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

	<title>trysomething</title>
	<script type="text/javascript" src="js/mummy.js" charset="utf-8"></script>
</head>

<body>
<script type="text/javascript" charset="utf-8">

Class({/*Human*/
	$define:function Human(){
		var name = "???";
		var father = {};
		var mother = {};

		this.getName = function(){return name;}
		this.setName = function(value){name = value;}

		this.Human = function(pname){
			name = pname;
			//console.log("Constructor : "+this.getTypeName()+" param : " +name);
		}

		this.setFather = function(F){
			if($(F).is(Man)){father = F;}else{throw "Man expected";}
		}

		this.getFather = function(){
			return father;
		}

		this.setMother = function(M){
			if($(M).is(Woman)){mother = M;}else{throw "Woman expected";}
		}

		this.getMother = function(){
			return mother;
		}

		this.sayHello = function(){
			console.log('Hello, I am '+name);
		}

	}

});

Class({/*Man*/
	//$extends:Human,
	$define:function Man(){
		$(this).Extends(Human);
		var sexe = 'male';

		this.Man=function(name){
			this.Human(name);
		}
	}

});


Class({/*Woman*/
	//$extends:Human,
	$define:function Woman(){
		$(this).Extends(Human);
		var sexe = 'female';

		this.Woman=function(name){
			this.Human(name);
		}
	}
});

var Steve = $(Man).New("Steve Jobs");
var Bill = $(Man).New("Bill Gates");

Bill.sayHello(); //Hello, I am Bill Gates
Steve.sayHello(); //Hello, I am Bill Gates


</script>

</body>
</html>
